import wx

from waveformpanel import WaveformPanel

# The main application window spawns these child frames
class ProjectFrame(wx.MDIChildFrame):
	def __init__(self, parent, id, name, project):
		wx.MDIChildFrame.__init__(self, parent, id, name)
		self.project = project

		#Make the editor panel
		panel = WaveformPanel(self, -1, self.project, size = self.GetSizeTuple())

		self.Bind(wx.EVT_CLOSE, self.OnClose)

	def OnClose(self, evt):
		self.project.thread.exit()
		evt.Skip()